#ifndef SAMPLES_NORMAL_H
#define SAMPLES_NORMAL_H
#include "SampleBase.h"
#include "Ray.h"
#include "ImageParam.h"
#include "HitableList.h"
#include "Sphere.h"
namespace RayTracer
{
	class NormalSamples : public SampleBase 
	{
	public:
		NormalSamples() = default;
		~NormalSamples() = default;

		void Init();
		void Render();
		void ImGui();
		void ShutDown();
	private:
		vec3 RayColor(const Ray& ray, const Hitable& world);
		void Reset();
	private:
		int curIndex;
		bool isGenerate;
		ImageParam mImageParam; // output image
		// scene
		HitableList world;
		std::shared_ptr<Sphere> sphere1;
		std::shared_ptr<Sphere> sphere2;
		// camera
		const float aspect_ratio = 8.0 / 5.0;
		float viewport_height;
		float viewport_width;
		float focal_length;

		// viewport
		vec3 origin = vec3(0, 0, 0);
		vec3 horizontal;
		vec3 vertical;
		vec3 lower_left_corner;

		// sky color
		vec3 upColor;
		vec3 downColor;
		vec3 sphereColor;
		bool isNormal = true;
	};
}
#endif // !SAMPLES_NORMAL_H


